import service from "../uitils/request"

export const buildListApi = (appName, branch) => {
    return service({
        url: "/build/list",
        method: 'GET',
        params: {
            appName: appName,
            branch: branch
        }
    })
}
export const lastBuildApi = (appName, branch) => {
    return service({
        url: "/build/last",
        method: 'GET',
        params: {
            appName: appName,
            branch: branch
        }
    })
}

export const buildApi = (appName, branch) => {
    return service({
        url: "/build",
        method: 'PUT',
        params: {
            appName: appName,
            branch: branch
        }
    })
}

export const buildConsoleApi = (buildId) => {
    return service({
        url: "/build/console",
        method: 'GET',
        params: {
            buildId: buildId
        }
    })
}


export const artifactListApi = (appName, branch) => {
    return service({
        url: "/artifact/list",
        method: 'GET',
        params: {
            appName: appName,
            branch: branch
        }
    })
}
